package PTA;
class Bird {
    String color;
    int size;

    public Bird(String color, int size) {
        this.color = color;
        this.size = size;
    }

    public String equals(Bird b) {
        if(this.color == b.color && this.size == this.size)
            return "是同一只鸟";
        return "不是同一只鸟";
    }
}
public class t6 {
    public static void main(String args[]){
        Bird b1=new Bird("black",200);
        Bird b2=new Bird("red",100);
        Bird b3=new Bird("green",200);
        Bird b4=new Bird("green",200);
        System.out.println(b1.equals(b2));
        System.out.println(b3.equals(b4));

    }
}
